package lt.web.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lt.web.mapper.DevUserMapper;
import lt.web.pojo.DevUser;
import lt.web.service.DevUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DevUserServiceImpl extends ServiceImpl<DevUserMapper, DevUser> implements DevUserService {

    @Autowired
    DevUserMapper devUserMapper;

    @Override
    public DevUser loginByCodeAndPassword(String devCode, String devPassword) {
        QueryWrapper queryWrapper =new QueryWrapper();
        queryWrapper.eq("devCode",devCode);
        queryWrapper.eq("devPassword",devPassword);
        return devUserMapper.selectOne(queryWrapper);
    }
}
